namespace Cos.Core.NHibernate
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    using Cos.Core.Model.Form;

    public class FormDataModel
    {
        protected Form instance;

        public FormDataModel() {}

        public virtual bool AnswerOnce { get; set; }

        public virtual DateTime? ApprobationDate { get; set; }

        public virtual string Author { get; set; }

        public virtual string CSS { get; set; }

        public virtual string ConfirmEmail { get; set; }

        public virtual DateTime CreationDate { get; set; }

        public virtual string DisplayType { get; set; }

        public virtual string EmailFrom { get; set; }

        //public virtual IEnumerable<FormCultureDataModel> FormCultures { get; set; }

        //public virtual IEnumerable<FormElementDataModel> FormElements { get; set; }

        //public virtual IEnumerable<FormPageDataModel> FormPages { get; set; }

        public virtual int Id { get; set; }

        public virtual bool IsDeleted { get; set; }

        public virtual int? Kickback { get; set; }

        public virtual DateTime LastModifiedDate { get; set; }

        public virtual string Name { get; set; }

        public virtual string PageCss { get; set; }

        public virtual string ReturnUrl { get; set; }

        public virtual string SelectedPageCss { get; set; }

        public virtual bool ShowAsSurvey { get; set; }

        public virtual bool ShowSummary { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as FormDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }
    }
}